package com.kun.controller.dto;

import com.kun.entity.Menu;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
public class MenuDto extends Menu{

    private List<Menu> children=new ArrayList<Menu>();



    public MenuDto(Integer id, String name, String path,String pagePath, String icon,
                   String description, Integer parentId, List<Menu> children) {
        super(id, name, path, pagePath, icon, description, parentId);
        this.children = children;
    }

    public MenuDto(Menu menu, List<Menu> children) {
        super(menu.getId(), menu.getName(), menu.getPath(),menu.getPagePath(), menu.getIcon(),
                menu.getDescription(), menu.getParentId());
        this.children = children;
    }

    public MenuDto(Menu menu) {
        super(menu.getId(), menu.getName(), menu.getPath(),menu.getPagePath(), menu.getIcon(),
                menu.getDescription(), menu.getParentId());
    }

    public MenuDto(List<Menu> children) {
        this.children = children;
    }


    public MenuDto() {
    }

    public List<Menu> getChildren() {
        return children;
    }

    public void setChildren(List<Menu> children) {
        this.children = children;
    }

}
